package be.bonamis.umpire.business;

import java.util.List;
import java.util.Set;

import org.joda.time.DateTime;

import be.bonamis.umpire.domain.Club;
import be.bonamis.umpire.domain.LeagueDay;
import be.bonamis.umpire.domain.LeagueDay.Status;
import be.bonamis.umpire.domain.Umpire;
import be.bonamis.umpire.domain.history.FairPlayReport;
import be.bonamis.umpire.domain.history.Game;
import be.bonamis.umpire.domain.quiz.Quiz;
import be.bonamis.umpire.history.FPReportStat;
import be.bonamis.umpire.quiz.IndividualResult;
import be.bonamis.umpire.quiz.QuizStat;

public interface UmpireService {
	void mergeOldDatabase(String arbitreCAFile, String dispoArbitreFile, String dispoEventFile, String dispoJourneeFile,
			String clubFile, String trainingFile, String gameTypeFile,
			String rankingFile, String beepTestFile);

	void mergeAll();

	Umpire getUmpireByLoginAndPassword(String login, String password);
	
	Umpire getUmpireById(long id);
	
	Umpire putUmpire(Umpire umpire);
	
	List<Umpire> getUmpiresList();
	
	List<Club> getClubsList();
	
	Set<DateTime> getDispoMonthList();
	
	List<LeagueDay> getLeagueDayListByUmpireByMonth(long umpireId,int mont, int year);
	
	List<Umpire> getUmpiresListByLeagueDay(long leagueDayId);
	
	byte[] generateUmpireByLeaguedayXlsFile(long id);
	
	Quiz createQuizFromFile(String filename);
	
	Quiz createQuiz(byte[] file);
	
	Quiz getQuiz(long id);
	
	List<Quiz> getAllQuiz();

	IndividualResult umpirePutResponsesOnQuiz(long personId, List<Boolean> responses, long quizId);
	
	IndividualResult getResponsesFromUmpireFromQuiz(long personId, long quizId);	
	
	QuizStat createQuizStats(long quizId);

	List<Game> findGamesByUmpire(Integer id);
	
	FPReportStat getFPResultByDivision();
	
	FPReportStat putUmpireFPReport(Integer umpireId, Integer gameId, FairPlayReport report01, FairPlayReport report02);
	
	Status getUmpireLeagueDayResponse(int umpireId, int leagueDayId);
	Status putUmpireLeagueDayResponse(int umpireId, int leagueDayId, Status status);
	
}
